package edu.stanford.prpl.impl;

import edu.stanford.prpl.api.PRPLObject;
import edu.stanford.prpl.api.PRPLObjectManager;

public abstract class PRPLObjectImpl implements PRPLObject {

	protected PRPLObjectManager prplObjectManager;
	protected String objectURI;

	protected PRPLObjectImpl(String objectURI){
		this.objectURI = objectURI;
	}
	
	public PRPLObjectImpl(String objectURI, PRPLObjectManager objectManager) {
		this.objectURI = objectURI;
		this.prplObjectManager = objectManager;
	}

	public boolean equals(Object o) {

		if (this == o)
			return true;
		if (!(o instanceof PRPLObjectImpl))
			return false;

		PRPLObjectImpl that = (PRPLObjectImpl) o;

		if (!objectURI.equals(that.objectURI))
			return false;

		return true;
	}

	public int hashCode() {
		return objectURI.hashCode();
	}

	public String toString() {
		return this.getURI();
	}
}
